<template>
  <div class="toolbar">
    <div class="toolbar-title" @click="showCoinModal">发布{{ money }} <i class="icon-arrow-up" /></div>
    <a class="btn-back" @click="handleBack">
      <i class="iconfont icon-fanhui"></i>
    </a>
    <coin-modal ref="coinModal" />
  </div>
</template>
<script>
import { mapState } from 'vuex'
import coinModal from '@/components/partials/otc/common/CoinModal'
export default {
  components: { coinModal },
  computed: {
    ...mapState({
      money: ({ otc }) => otc.money
    })
  },
  methods: {
    handleBack () {
      this.$router.back()
    },
    showCoinModal () {
      this.$refs.coinModal.show()
    }
  }
}
</script>
<style scoped>
.toolbar {
  height: 50px;
  font-size: 20px;
  text-align: center;
  color: #173e5d;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  z-index: 999;
  border-bottom: 1px solid #f0f3f8;
  box-sizing: border-box;
}
.toolbar .btn-back {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  line-height: 44px;
  cursor: pointer;
}
.iconfont {
  font-size: 18px;
}
.toolbar .btn-back i {
  color: #858b97;
}

.toolbar-title {
  font-size: 18px;
  line-height: 50px;
  text-align: center;
}
.icon-arrow-up {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('~@/assets/images/icons/arrow-up.svg');
  background-repeat: no-repeat;
  background-size: 130% 130%;
  background-position: -4px 1px;
}
</style>
